package com.example.androidroomdemo;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.example.androidroomdemo.Entities.User;

import java.util.List;

public class UserAdapter extends BaseQuickAdapter<User, BaseViewHolder> {
    public UserAdapter(int layoutResId, List<User> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, User item) {
        helper.setText(R.id.item_name_tv, item.getAliasName());
        helper.setText(R.id.item_age_tv, item.getAge() + "岁");
        helper.setText(R.id.item_ads_tv, item.getAds());
    }
}